<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

<f:view contentType="text/html;charset=UTF-8" encoding="UTF-8">
    <h:head>

    </h:head>

    <h:body>

        <h:form id="form">
            <p:datePicker id="datepicker1" value="#{datePicker012.date1}"
                          model="#{datePicker012.lazyModel1}" refreshLazyModel="true"
                          monthNavigator="true" yearNavigator="true" showButtonBar="true">
                <p:ajax event="dateSelect" listener="#{datePicker012.onDateSelect}"/>
                <p:ajax event="viewChange" listener="#{datePicker012.onViewChange}"/>
            </p:datePicker>
            <p:datePicker id="datepicker2" value="#{datePicker012.date2}"
                          model="#{datePicker012.lazyModel2}" refreshLazyModel="true"
                          monthNavigator="true" yearNavigator="true" showButtonBar="true">
                <p:ajax event="dateSelect" listener="#{datePicker012.onDateSelect}"/>
                <p:ajax event="viewChange" listener="#{datePicker012.onViewChange}"/>
            </p:datePicker>
        </h:form>

    </h:body>
</f:view>

</html>